package bysj.domain;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Collection;

@Setter
@Getter
@AllArgsConstructor
public class ApplicationForSupervisor implements Comparable<ApplicationForSupervisor>, Serializable {
    //志愿集合
    private Collection<ApplicationForSupervisorEntry> applicationForSupervisorEntries;
    private Integer id;
    //自我介绍
    private String selfIntroduction;
    //填写志愿的学生
    private Student student;
    //年份
    private int year;
    @Override
    public int compareTo(ApplicationForSupervisor applicationForSupervisor){
        return this.id-applicationForSupervisor.id;
    }

    public String toString()
    {
        final String TAB = "    ";

        String retValue = "";

        retValue = "ApplicationForSupervisor ( "
                + super.toString() + TAB
                + "entries = " + this.applicationForSupervisorEntries + TAB
                + "id = " + this.id + TAB
                + "self = " + this.selfIntroduction + TAB
                + "student = " + this.student + TAB
                + "year = " + this.year + TAB
                + " )";

        return retValue;
    }

}
